var gulp = require('gulp'),
    concat = require('gulp-minify-css'),
    cssver = require('gulp-make-css-url-version'),
    uglify = require('gulp-uglify'),
    jsConcat = require('gulp-concat'),
    cssConcat = require('gulp-concat'),
    replace = require('gulp-html-replace');

gulp.task('bcss',function() {
    gulp.src('./css/*.css')
    .pipe(concat('build.css'))
    .pipe(cssConcat('build.css'))
    .pipe(cssver())
    .pipe(gulp.dest('dist/css'));
});

gulp.task('bjs', function() {
    gulp.src(
        './js/*.js'
    )
    .pipe(jsConcat('build.js'))
    .pipe(uglify())
    .pipe(gulp.dest('dist/js'));
});

gulp.task('bhtml', function() {
    gulp.src('./html/index3.html')
    .pipe(replace({
        css: './dist/css/build.css',
        js: './dist/js/build.js'
    }))
    .pipe(gulp.dest('dist'));
});

